import 'package:get/get.dart';
import 'package:yt_devops/components/log_utils.dart';
import 'package:yt_devops/routers/router_path.dart';
import 'package:yt_devops/user_entity_manager.dart';

class NoPermissionController extends GetxController {
  @override
  void onInit() {
    super.onInit();
  }

  @override
  void onReady() {}

  @override
  void onClose() {}

  goBack() async {
    if (Get.arguments != null && Get.arguments['backLogin'] != null) {
      Log.d('backLogin===');
      await UserEntityManager().cleanAuth();
      Get.offAllNamed(RouterPath.login);
    } else {
      Log.d('back===');
      Get.back();
    }
  }
}
